@use "vars" as *;

@-ms-viewport {
    min-width: 480px;
    max-width: device-width;
}

@-o-viewport {
    min-width: 480px;
    max-width: device-width;
}

@viewport {
    min-width: 480px;
    max-width: device-width;
}

a {
    color: $color_link75;

    &:hover {
        color: $color_link100;
    }

    &:active {
        color: $color_link200;
    }
}

img {
    max-width: 100%;

    // height: auto
}

.full {
    width: 100%;
}

table.sortable thead {
    background-color: $color_primary10;
    color: #666;
    font-weight: bold;
    cursor: default;
}

th {
    &.tablesorter-headerAsc:after {
        content: " ▴";
    }

    &.tablesorter-headerDesc:after {
        content: " ▾";
    }
}

div {
    &.tablesorter-header-inner {
        display: inline;
    }
}

pre {
    white-space: pre-wrap;
}

hr {
    display: block;
    height: 0;
    border: 0;
    font-style: italic;
    border-bottom: 1px solid $color_primary25;
    padding: 0;
}

.dashed {
    border-bottom: 1px dashed $color_primary25;
}

th {
    vertical-align: middle;
}

.form-area {
    display: inline-block;
    background: $color_primary5;
    padding: 5px 10px 10px;
    border-radius: $widget_border_radius;
    border: 1px solid $color_primary25;
}

div.info-float {
    float: right;
    padding: 10px;
}

footer {
    color: $color_primary50;
    display: block;
    width: 100%;
    position: absolute;
    bottom: 0;
}

body {
    position: relative;
    min-height: 100%;
    margin: 0 auto;
    max-width: 107em;
    font-size: $base_font_size;
    line-height: 1.231;
    background: $color_primary5;
    font-family: "Segoe UI", "Lucida Grande", Arial, sans-serif;
    color: $color_primary100;
    height: 100%;
}

.unselectable {
    cursor: default;
}

h1 {
    font-size: 5em;
    letter-spacing: -2px;
    margin: 0;
    padding: 0;
    line-height: 1em;
}

b {
    font-weight: bold;
}

h2 {
    font-weight: 400;
    font-size: 2em;
    border-radius: $widget_border_radius;
    padding: 0;
    margin: 0;
}

h3 {
    font-weight: 400;
    font-size: 1.4em;
    border-radius: $widget_border_radius;
    padding: 0;
    margin: 0;
}

h4 {
    font-size: 1.1em;
    padding: 0;
    margin: 0;
}

hr {
    color: rgba(0, 0, 0, 0.2);
}

#content {
    margin: 52px auto auto;

    // Header
    width: 90%;
    height: 100%;
    min-height: 25em;
    display: block;

    .title {
        color: $color_primary75;
    }
}

footer {
    text-align: center;
    height: 40px;
    border-top: 1px solid $color_primary25;
    background: $color_primary10;
}

html {
    position: relative;
    height: 100%;
}

a {
    text-decoration: none;
    display: inline;
}

noscript #noscript {
    font-family: Arial, sans-serif;
    font-size: 111%;
    color: white;
    font-weight: bold;
    background: $announcement_red;
    text-align: center;
    padding: 5px 0;
    left: 0;
    right: 0;
    position: fixed;
    z-index: 100;
}

#announcement {
    font-family: Arial, sans-serif;
    font-size: 111%;
    color: white;
    font-weight: bold;
    background: $announcement_red;
    text-align: center;
    max-width: 30%;
    position: fixed;
    border-radius: $widget_border_radius;
    z-index: 100;
    bottom: -4px;
    right: -4px;
    padding: 5px 6px 6px 5px;

    a {
        color: orange;
    }
}

.time {
    color: $color_primary75;
}

.toggle {
    font-weight: bold;

    .fa {
        transition: transform 0.4s;
    }

    &.open .fa {
        transform: rotate(90deg);
    }
}

#form-errors, .form-errors {
    background: rgba(255, 0, 0, 0.3);
    border: 3px solid red;
    border-radius: $widget_border_radius;
    padding: 0 1em 0.1em 1em;
    margin: 0.3em 0 0.5em 0;
}

#contest-info {
    font-size: 1.25em;
    border: 5px solid $highlight_blue;
    border-left: 5px dotted white;
    border-radius: 0 $widget_border_radius $widget_border_radius 0;
    background: rgba(0, 0, 0, 0.77);
    z-index: 100000;
    padding: 10px 12px;
    color: white;
    cursor: move;
    position: fixed;
    left: 20px;
    top: 90%;
    display: none;

    a {
        height: 1.4em;
        padding: 0;
        margin: 0;
        color: white;
        display: block;
    }
}

#contest-time-remaining {
    display: inline-block;
}

#page-container {
    min-height: 100%;
    position: relative;
    margin: 0 auto;
    border-right: 1px solid $color_primary25;
    border-left: 1px solid $color_primary25;
    background: $color_pageBg;
}

// border-bottom: 1px solid rgb(204, 204, 204)
// border-bottom-left-radius: 4px
// border-bottom-right-radius: 4px

#content-body {
    padding-bottom: 4em;
}

// Offset the footer

.title-line-action {
    float: right;
    margin-top: 1.2em;
}

math {
    font-size: 1.155em;
}

.MathJax {
    &:focus {
        outline: none;
    }
}

@media(max-width: 1498px) {
    #page-container {
        border-left: none;
        border-right: none;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

@media (max-width: 760px) {
    #content {
        width: auto;
        padding: 0 5px;
    }
}
